<template>
  <div class="bigBoard">
    <div class="nav-menu-item" @click="tDashBoard">
      <Icon
        color="#c6e3ff"
        class="nav-menu-icon"
        name="fa fa-codepen"
        size="22"
      />
      <span>设备地图</span>
    </div>
    <div class="nav-menu-logo">
      <img
        style="width: 45px; height: 45px; border-radius: 50%"
        src="@/assets/zhongwudark.png"
        alt="logo"
      />
      <span>中吴云天</span>
    </div>
    <!-- <text class="headerText">云天工业污染颗粒物排放监控平台</text> -->
    <Main />
  </div>
</template>
<script lang="ts" setup>
import Main from "@/layouts/backend/router-view/main.vue";
import { useRouter } from "vue-router";
import { onBeforeUnmount, ref } from "vue";
import useCurrentInstance from "@/utils/useCurrentInstance";

const { proxy } = useCurrentInstance();
const tDashBoard = () => {
  proxy.eventBus.emit("ToDashBoard");
  proxy.eventBus.emit("clear");
};
onBeforeUnmount(() => {});
</script>
<style lang="scss" scoped>
.bigBoard {
  width: 100%;
  height: 100%;
  position: relative;
  //dashboard布局el-main的样式
  .el-main {
    padding: 0 !important;
    background-color: #101129 !important;
  }
  .nav-menu-logo {
    position: absolute;
    left: 15px;
    top: 10px;
    z-index: 10;
    width: 10%;
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: flex-start;
    color: #fff;
    span {
      font-family: FangSong;
      font-weight: 600;
      font-size: 1.1rem;
      padding-left: 5px;
    }
  }
  .nav-menu-item {
    position: absolute;
    right: 15px;
    top: 15px;
    z-index: 10;
    width: 100px;
    display: flex;
    align-items: center;
    flex-direction: row;
    color: #fff;
    font-weight: 600;
    justify-content: space-around;
    cursor: pointer;
    .icon {
      box-sizing: content-box;
      // border: 1px solid #37ebfd;
    }
    span {
      transition: all 0.9s;
    }
    span:hover {
      font-weight: bolder;
    }

    &:hover {
      .icon {
        animation: twinkle 0.3s ease-in-out;
      }
    }
  }
}
</style>
